<html>
<head>
	<title>Projects</title>
    <link rel="stylesheet" href="<?php print WEB_PATH . LConfig::getStyle();  ?>" type="text/css" />
</head>
<body>
	<div class="main">
    	<div class="mheader">
        	<div class="logo_img"><a href="<?php print "?article" ?>"><img width="64px" src="<?php print WEB_PATH . LConfig::getLogo(); ?>" title="Source Viewer" /></a></div>
            <div class="logo_title"><?php print LConfig::getTitle(); ?></div><div class="clear_both"></div>
        </div>
        <?php
            if(count($data) > 0){
                 foreach ($data as $art){
        ?>
        <div class="article">
        	<div class="article_icon"><a href="<?php print "?article&id=" . $art['id']; ?>"><img width="24px" src="<?php print WEB_PATH . LConfig::getArticleIcon(); ?>"/></a></div>
        	<div class="article_id"><a href="<?php print "?article&id=" . $art['id']; ?>"><?php print $art['id']; ?></a></div>
            <div class="article_name">
                <a href="<?php print "?article&id=" . $art['id']; ?>"><?php print $art['name']; ?></a>
                <div style="float: right; font-size: 11pt; margin-right: 20px; font-weight: 100;"><em>Posted:</em> <?php print $art['datum']; ?></div>
                <div style="float: right; font-size: 11pt; margin-right: 20px; font-weight: 100;"><em>Author:</em> <?php print $art['author']; ?></div>
                <div class="clear_both"></div>
            </div>
            <div class="clear_both"></div>
            <div class="article_body">
            	<div class="article_image"><img height="150px" src="
            	<?php 
            	    if(file_exists(WEB_PATH . IMAGE_PATH . $art['img'])){
                        print WEB_PATH . IMAGE_PATH . $art['img'];
                    }else{
                        print WEB_PATH . IMAGE_PATH . LConfig::getNoImg();
                    } 
                ?>" title=""/></div>
                <div class="article_description">
                	<div class="article_description_text"><?php print $art['description']; ?></div>
                    <div class="article_links">
                    	<?php 
                            if(!array_key_exists('source', $art)){ ?>
                        <a class="article_source" href="#">Source</a>
                        <?php } ?>
                        <a class="article_demo" href="<?php print $art['link']; ?>">Demo</a>
                    </div>
                </div>
                <div class="clear_both"></div>
            </div>
            <?php if(array_key_exists('source', $art)){ ?>
            <div class="clear_both"></div>
            <div class="source_header" style="height: 35px;">
               	  <ul>
                    	<a class="active_link" href="#"><li>ALL</li></a>
                    	<a><li>PHP</li></a>
                    	<a><li>CSS</li></a>
                    	<a><li>SQL</li></a>
                  </ul>
            </div>
                <div class="clear_both"></div>
            <div class="source_art">
                	<div class="source_title">php/myphp.php</div>
                	<pre class="brush: php">
                    	function getHolder($hej){
                        	echo "print";
                        }
                    </pre>
            </div>
            <?php } ?>
            <div class="clear_both"></div>
        </div>
        <?php } } ?>
    </div>
</body>
</html>